//		ID : Xerxes
//      "I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;

#define VI vector< int >
#define CI( x ) scanf("%d",&x)
#define CL( x ) scanf("%lld",&x)
#define CD( x ) scanf("%lf",&x )
#define fo(i,st,ed) for(int i = st ; i < ed ; ++i )
#define foE(i,st,ed) for(int i = st ; i <= ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )
#define tp pair< int, pair<int,int> >
#define mmk( x, y , z ) mk( x, mk( y, z ) )

inline void wait( double seconds ){
    double endtime = clock()+( seconds* CLOCKS_PER_SEC );
    while( clock() < endtime ){
        ;
    }
}
const int inf = (int)1e4;
int imp[ inf+10 ];
int dist[ inf+10 ];
int n; // number of city
int l; // number of line
vector< VI > path;

inline void Read(){
		
		CI(n);
		CI(l);
		
		SET(imp,0);
		path.assign(n+5, VI() );
		
		
		fo(i,0,l){
			int x;
			vector< int > vi;
			while( scanf("%d",&x)==1 ){
				if( x==0 )break;
				vi.pb(x);
			}
			for(int i=0,j=SZ(vi); i<j; ++i){
				++imp[vi[i]];
				if( i ){
					path[ vi[i] ].pb( vi[i-1] );
					path[ vi[i-1] ].pb( vi[i] );
				}
			}
		}
}
inline int bfs(int me){
	foE(i,1,n){
		dist[i]= (int)1023456789;
	}
	queue< int > q;
	q.push(me);
	dist[me]=0;
	
	while( q.empty()==false ){
		int nw = q.front();
		q.pop();
		
		for(int i=0,j=SZ(path[nw]); i<j; ++i ){
			int cango = path[nw][i];
			if( dist[nw]+1 < dist[cango] ){
				dist[cango] = dist[nw]+1;
				q.push(cango);
			}
		}
	}
	
	int cost=0;
	foE(i,1,n){
		if( imp[i] > 1 ){
			cost+=dist[i];
		}
	}
return cost;
}

inline void Proc(){
	int retval = 0;
	int best = 0;
	bool prothom= true;
	
	foE(i,1,n){
		if( imp[i]>1 ){
			int d = bfs(i);
			if( prothom ){
				prothom=false;
				best = d;
				retval = i;
			}
			else{
				if( best==d ){
					retval = min( retval, i);
				}
				else{
					if( d < best ){
						best = d;
						retval = i;
					}
				}
			}	
		}
	}
	
	printf("Krochanska is in: %d\n",retval);
}

int main(){
    #ifndef ONLINE_JUDGE
        freopen("in","rt",stdin);
    #endif
    int cases=1;
    for( CI(cases) ; cases ; --cases ){
        Read();
        Proc();
    }

return 0;
}


